package cn.imnaer.service.rest.userinfo;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;

/**
 * Created by Administrator on 2015/5/26.
 */
@Path(value = "/user/friend")
public interface FriendComponentRestApi {

    @GET
    @Produces("application/json;charset=UTF-8")
    @Path(value = "/list/{userId}")
    public String getMyFriends(@PathParam("userId") String userId);

    @POST
    @Produces("application/json;charset=UTF-8")
    @Path(value = "/add")
    @Consumes(MediaType.MULTIPART_FORM_DATA)
    public String buildFriendRelation(String json);

    @POST
    @Produces("application/json;charset=UTF-8")
    @Path(value = "/delete")
    @Consumes(MediaType.MULTIPART_FORM_DATA)
    public String deleteFriendRelation(String json);

    @POST
    @Produces("application/json;charset=UTF-8")
    @Path(value = "/update")
    @Consumes(MediaType.MULTIPART_FORM_DATA)
    public String updateFriendRelation(String json);

    @GET
    @Produces("application/json;charset=UTF-8")
    @Path(value = "/permission/{userId}")
    public String getUserPermission(@PathParam("userId") String userId);

    @POST
    @Produces("application/json;charset=UTF-8")
    @Path(value = "/permission/setting/{userId}")
    @Consumes(MediaType.MULTIPART_FORM_DATA)
    public String settingUserPermission(@PathParam("userId") String userId, String json);

    @POST
    @Produces("application/json;charset=UTF-8")
    @Path(value = "/sendPaper/{acceptUserId}")
    @Consumes(MediaType.MULTIPART_FORM_DATA)
    public String sendPaper(@PathParam("acceptUserId") String acceptUserId, String json);

    @POST
    @Produces("application/json;charset=UTF-8")
    @Path(value = "/replyPaper/{requestId}")
    @Consumes(MediaType.MULTIPART_FORM_DATA)
    public String replyPaper(@PathParam("requestId") String requestId, String json);

    @GET
    @Produces("application/json;charset=UTF-8")
    @Path(value = "/countUnReadFriendRequest/{userId}")
    public String countUnReadFriendRequest(@PathParam("userId") String userId);

    @GET
    @Produces("application/json;charset=UTF-8")
    @Path(value = "/findUnReadFriendRequest/{userId}")
    public String findUnReadFriendRequest(@PathParam("userId") String userId);

    @GET
    @Produces("application/json;charset=UTF-8")
    @Path(value = "/friendRequest/list/{userId}")
    public String findAllFriendRequest(@PathParam("userId") String userId);

    @GET
    @Produces("application/json;charset=UTF-8")
    @Path(value = "/deleteFriendRequest/{requestId}")
    public String deleteFriendRequest(@PathParam("requestId") String requestId);

    @GET
    @Produces("application/json;charset=UTF-8")
    @Path(value = "/friendRequest/new/{userId}")
    public String countNewFriendNotice(@PathParam("userId") String userId);



}
